<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <css file="__PUBLIC__/css/base.css"/>
    <link type="text/css" href="__ROOT__/data/ui/css/flick/jquery-ui-1.8.23.custom.css" rel="stylesheet" />
    <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="__ROOT__/data/ui/js/jquery-ui-1.8.23.custom.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $("#tabs").tabs();
        })
    </script>

</head>
<body marginleft="10">
    <div class="now_path">
        <strong>您现在的位置：</strong>
		修改栏目
    </div>
	<fieldset class='field_tishi'>
		<legend>操作提示</legend>
		修改栏目的时候请注意选择栏目的父栏目
	</fieldset>
    <form action="__CONTROL__/modify_exe" method="post">
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1">基本内容</a></li>
                <li><a href="#tabs-2">生成静态规则</a></li>
                <li><a href="#tabs-3">模板设置</a></li>
				<li><a href="#tabs-4">权限相关</a></li>
            </ul>
            <div id="tabs-1">
                <table class="table2">
                    <tr>
                        <th>栏目名称：</th>
                        <td><input type="text" name="cname" style="width:360px;" value='{$cat_list.cname}'/></td>
                    </tr>
					<tr>
                        <th>父栏目：</th>
                        <td>
                        	<select name='pid'>
                        		<option value='0' selected='selected'>-作为顶级栏目-</option>
                        		<foreach from='$category' value='$v'>
                        			<if value="$v.level gt 1"> 
            							<if value='$v.catid eq $cat_list.pid'>
	                        				<option value='{$v.catid}' selected='selected'>{$v.html}└{$v.cname}</option>
										<?php }else if($v['catid'] != $cat_list['pid']){ ?>
											<option value='{$v.catid}'>{$v.html}└{$v.cname}</option>
	                        			</if>
           								 <else />
										 <if value='$v.catid eq $cat_list.pid'>
	                        				<option value='{$v.catid}' selected='selected'>{$v.cname}</option>
										<?php }else if($v['catid'] != $cat_list['pid']){ ?>
											<option value='{$v.catid}'>{$v.cname}</option>
	                        			</if>
        							</if>
                        		</foreach>
                        	</select>
						</td>
                    </tr>
                    <tr>
                        <th>目录名称：</th>
                        <td><input type="text" name="catdir" style="width:200px;" value='{$cat_list.catdir}'/>
                            <span class="desc"><font color="red">目录名称必须为英文</font></span></td>
                    </tr>
                    <tr>
                        <th>跳转url：</th>
                        <td><input type="text" name="gourl" style="width:260px;" value='{$cat_list.gourl}'/></td>
                    </tr>
                    <tr>
                        <th>是否显示：</th>
                        <td>
                        	<if value='$cat_list.isshow eq 1'>
                        		<input type="radio" name="isshow" value="1" checked="checked"/>是&nbsp;&nbsp;
								<input type="radio" name="isshow" value="0"/>否
							<else />
								<input type="radio" name="isshow" value="1"/>是&nbsp;&nbsp;
                            	<input type="radio" name="isshow" value="0" checked="checked"/>否
							</if>
						</td>
                    </tr>
					<tr>
                        <th>排序：</th>
                        <td><input type="text" name="sort" value="{$cat_list.sort}"/></td>
                    </tr>
                    <tr>
                        <th>关键字：</th>
                        <td><input type="text" name="keywords" style="width:300px;" value='{$cat_list.keywords}'/></td>
                    </tr>
                    <tr>
                        <th>描述：</th>
                        <td><textarea style="height:60px;width:90%" name="descroption">{$cat_list.descroption}</textarea></td>
                    </tr>
                </table>
            </div>

            <div id="tabs-2">
                <table class="table2">
                    <tr>
                        <th>栏目生成静态：</th>
                        <td>
                        	<if value='$cat_list.iscathtml eq 1'>
                        		<input type="radio" name="iscathtml" value="1" checked="checked"/>是&nbsp;&nbsp;
								<input type="radio" name="iscathtml" value="0"/>否
							<else />
								<input type="radio" name="iscathtml" value="1"/>是&nbsp;&nbsp;
                            	<input type="radio" name="iscathtml" value="0" checked="checked"/>否
							</if>
						</td>
                    </tr>
                    <tr>
                        <th>内容生成静态：</th>
                        <td>
                        	<if value='$cat_list.isconhtml eq 1'>
                        		<input type="radio" name="isconhtml" value="1" checked="checked"/>是&nbsp;&nbsp;
								<input type="radio" name="isconhtml" value="0"/>否
							<else />
								<input type="radio" name="isconhtml" value="1"/>是&nbsp;&nbsp;
                            	<input type="radio" name="isconhtml" value="0" checked="checked"/>否
							</if>
						</td>
                    </tr>
                    <tr>
                        <th>栏目页静态规则：</th>
                        <td><input type="text" name="cathtml" style="width:360px;" value="{$cat_list.cathtml}"/>
                            <span class="desc">{catdir}栏目目录，{y}年{m}月{d}日{catid},栏目id,{page}页码</span></td>
                    </tr>
                    <tr>
                        <th>内容页静态规则：</th>
                        <td><input type="text" name="conhtml" style="width:360px;" value="{$cat_list.conhtml}"/>
                            <span class="desc">{catdir}栏目目录，{y}年{m}月{d}日{catid},栏目id,{page}页码</span></td>
                        </td>
                    </tr>
                </table>
            </div>

            <div id="tabs-3">
                <table class="table2">
                    <tr>
                        <th>首页模板：</th>
                        <td><input type="text" name="indextpl" style="width:360px;" value="{$cat_list.indextpl}"/></td>
                    </tr>
                    <tr>
                        <th>列表页模板：</th>
                        <td><input type="text" name="listtpl" style="width:360px;" value="{$cat_list.listtpl}"/></td>
                    </tr>
                    <tr>
                        <th>内容页模板：</th>
                        <td><input type="text" name="contpl" style="width:360px;" value="{$cat_list.contpl}"/></td>
                    </tr>
                </table>
            </div>
			<div id='tabs-4'>
				<table class="table1">
                    <thead>
                    	<tr>
                    		<td width='100'>用户组角色</td>
							<td>权限管理</td>
                    	</tr>
                    </thead>
					<tbody>
						<tr>
							<td>后台用户组</td>
							<td>
								<table class='table2'>
									<thead>
										<tr>
											<td width='150'>用户组</td>
											<td>查看</td>
											<td>添加</td>
											<td>删除</td>
											<td>修改</td>
											<td>移动</td>
											<td>排序</td>
										</tr>
									</thead>
									<tbody>
										<foreach from='$admin' value='$v'>
											<tr>
												<td width='150'>{$v.rname}({$v.title})</td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},查看" <if value='in_array("查看",$v.access)'>checked='checked'</if>/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},添加" <if value='in_array("添加",$v.access)'>checked='checked'</if>/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},删除" <if value='in_array("删除",$v.access)'>checked='checked'</if>/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},修改" <if value='in_array("修改",$v.access)'>checked='checked'</if>/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},移动" <if value='in_array("移动",$v.access)'>checked='checked'</if>/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},排序" <if value='in_array("排序",$v.access)'>checked='checked'</if>/></td>
											</tr>
										</foreach>
									</tbody>
								</table>
							</td>
						</tr>
						<tr>
							<td>前台用户组</td>
							<td>
								<table class='table2'>
									<thead>
										<tr>
											<td width='150'>用户组</td>
											<td>前台查看</td>
											<td>前台投稿</td>
											<td>前台评论</td>
										</tr>
									</thead>
									<tbody>
										<foreach from='$user' value='$v'>
											<tr>
												<td width='150'>{$v.rname}({$v.title})</td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},前台查看"  <if value='in_array("前台查看",$v.access)'>checked='checked'</if>/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},前台投稿"  <if value='in_array("前台投稿",$v.access)'>checked='checked'</if>/></td>
												<td><input type="checkbox" name="category_access[]" value="{$v.rid},前台评论"  <if value='in_array("前台评论",$v.access)'>checked='checked'</if>/></td>
											</tr>
										</foreach>
									</tbody>
								</table>
							</td>
						</tr>
					</tbody>
                </table>
			</div>
            <div style="padding-left:100px;">
			<input type='hidden' name='catid' value='{$cat_list.catid}' />
                <input type="submit" value="提交修改" class="submit"/>
            </div>
        </div>
    </form>
</body>
</html>
